package com.deyuanyun.pic.pig.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.deyuanyun.pic.common.spring.SpringAppliction;
import com.deyuanyun.pic.pig.service.PiggingUtilService;

public class PiggingUtil {
	/**
	 * 
	 * @param imgUrl 图片路径
	 * @param taskId 任务Id
	 * @param isViewPoint true=获取该任务所有跟踪点的图片
	 * @param isViewBall true=获取该任务收发球筒的图片
	 * @param pointId 不为null表示获取某个跟踪点的图片,前提是：isViewPoint=true
	 * @Description isViewPoint 和 isViewBall 同时为true=同时获取跟踪点和收发球筒的图片
	 * @return 返回list中 : PATH为【完整】路径 ，MARK='fa'发球筒，MARK='shou'收球筒，MARK='point'跟踪点
	 */
	@SuppressWarnings("rawtypes")
	public static List searchImg(String imgUrl,String taskId,String pointId,boolean isViewPoint,boolean isViewBall) {
		PiggingUtilService piggingUtilService= SpringAppliction.getBean(PiggingUtilService.class);
		Map<String, Object> map = new HashMap<String,Object>();
		map.put("imgUrl", imgUrl);
		map.put("taskId", taskId);
		map.put("pointId", pointId);
		map.put("isViewPoint", isViewPoint);
		map.put("isViewBall", isViewBall);
		List imgList = piggingUtilService.searchImg(map);
		return imgList;
	}
}
